package com.hanserwei.han_picture.domain.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 图片批量上传结果VO
 * 
 * @author hanserwei
 */
@Data
public class PictureBatchUploadVO implements Serializable {

    @Serial
    private static final long serialVersionUID = -987654321L;

    /**
     * 总上传数量
     */
    @Schema(description = "总上传数量")
    private Integer totalCount;

    /**
     * 成功上传数量
     */
    @Schema(description = "成功上传数量")
    private Integer successCount;

    /**
     * 失败上传数量
     */
    @Schema(description = "失败上传数量")
    private Integer failureCount;

    /**
     * 成功上传的图片列表
     */
    @Schema(description = "成功上传的图片列表")
    private List<PictureVO> successList;

    /**
     * 失败上传的图片信息列表
     */
    @Schema(description = "失败上传的图片信息列表")
    private List<UploadFailureInfo> failureList;

    /**
     * 是否有异步任务在处理
     */
    @Schema(description = "是否有异步任务在处理AI标签生成")
    private Boolean hasAsyncTask;

    /**
     * 上传失败信息
     */
    @Data
    public static class UploadFailureInfo implements Serializable {

        @Serial
        private static final long serialVersionUID = -111111111L;

        /**
         * 文件名
         */
        @Schema(description = "文件名")
        private String fileName;

        /**
         * 失败原因
         */
        @Schema(description = "失败原因")
        private String failureReason;

        /**
         * 文件大小（字节）
         */
        @Schema(description = "文件大小（字节）")
        private Long fileSize;
    }
}
